import store from '@/store/index.js'

export async function hasPermission(permissionCode) {
  const permissions = store.getters['user/permissions']
  await permissions.forEach(element => {
    if (element.authority === permissionCode) {
      return true;
    } else {
      return false;
    }
  });
}